Completed
Push — master ( e9cdde...e60414 )
by Ajeh
33s
created

helpers.js ➔ nodeLength   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 3
rs 10
nop 1
1
/**
2
 * Created by Emmy on 10/11/2017.
3
 */
4
5
export function getElem(selector, all = false) {
6
    return all ? document.querySelectorAll(selector) : document.querySelector(selector)
7
}
8
export function nodeLength(selector) {
9
    return getElem(selector, true).length
10
}
11